﻿<controls:MovableWindow
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:iTuner"
  xmlns:controls="clr-namespace:iTuner.Controls"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
  mc:Ignorable="d" d:DesignWidth="248"
  x:Class="iTuner.ImportDialog"
  x:ClassModifier="internal" Background="Transparent"
  Title="" Width="408" MinHeight="175" SizeToContent="Height"
  ShowInTaskbar="False" AllowsTransparency="True" Topmost="True"
  WindowStyle="None" Visibility="Visible" WindowStartupLocation="CenterScreen">

  <Window.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="..\Controls\iStyles.xaml"/>
        <ResourceDictionary Source="..\Controls\DetailPanelStyles.xaml"/>
      </ResourceDictionary.MergedDictionaries>

      <Style TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="FontFamily" Value="Segoe UI"/>
        <Setter Property="Margin" Value="0,0,5,0"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
      </Style>

    </ResourceDictionary>
  </Window.Resources>

  <Border
    x:Name="mainBorder" CornerRadius="5" Padding="1" Margin="0,0,8,8"
    Background="{StaticResource iTunesOutline}">
    <Border.Effect>
      <DropShadowEffect BlurRadius="6" ShadowDepth="6" Opacity="0.30"/>
    </Border.Effect>

    <Border
      CornerRadius="5" Padding="0"
      Background="{StaticResource iTunesBackground}">

      <DockPanel Margin="5,5,5,10" LastChildFill="False">

        <local:DetailPanel x:Name="detailPanel" Margin="0,0,0,14" DockPanel.Dock="Top">
          <StackPanel>
            <TextBlock
              x:Name="titleBlock" Text="iTuner Import Playlist" FontWeight="Bold"
              Background="Transparent" HorizontalAlignment="Center" />
          </StackPanel>
        </local:DetailPanel>

        <DockPanel
          HorizontalAlignment="Stretch" LastChildFill="True"
          DockPanel.Dock="Bottom" Margin="20,14,10,0">
          <Button
            Name="cancelButton"
            Content="Cancel" IsCancel="True" DockPanel.Dock="Right"
            Height="24" Width="60" HorizontalAlignment="Right"
            Style="{StaticResource iButtonStyle}" Margin="4,0,0,0" />
          <Button
            Name="importButton"
            Content="Import" IsDefault="True" Click="DoImport" DockPanel.Dock="Right"
            Height="24" Width="60" HorizontalAlignment="Right"
            Style="{StaticResource iButtonStyle}" Margin="4,0,0,0" />
          <StackPanel x:Name="progressPanel" Visibility="Hidden" Margin="0,0,20,0">
            <ProgressBar
              x:Name="progressBar" Height="8" Value="50"
              DockPanel.Dock="Left" VerticalAlignment="Bottom" />
            <TextBlock
              x:Name="progressText" Text="Importing..."
              FontSize="10" Margin="2,0,0,0" TextTrimming="CharacterEllipsis"/>
          </StackPanel>
        </DockPanel>

        <Grid DockPanel.Dock="Top" Margin="10,0,10,0">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
          </Grid.ColumnDefinitions>
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
          </Grid.RowDefinitions>

          <TextBlock
            Text="Playlist location:" Grid.Row="2" Margin="0,3,5,1" HorizontalAlignment="Right" FontWeight="Bold" />

          <DockPanel Grid.Row="2" Grid.Column="1" Margin="0,5,0,0" LastChildFill="True">
            <Button
              Content="..." Click="DoSelectFolder"
              Width="20" DockPanel.Dock="Right"
              Style="{StaticResource iButtonStyle}" Margin="4,0,0,0" />
            <TextBox
              x:Name="locationBox" Text="C:\Music" VerticalContentAlignment="Bottom"
              Style="{DynamicResource TextBoxStyle}" />
          </DockPanel>

        </Grid>
      </DockPanel>
    </Border>
  </Border>
</controls:MovableWindow>
